package com.example.design_pattern.iterator.inner;

import com.example.design_pattern.iterator.Iterator;

public class Client {

    public static void main(String[] args){
        Client client = new Client();
        client.test1();

    }

    private void test1(){
        MyCollectionIn<String> collectionIn = new MyCollectionIn<>();
        collectionIn.add("aaa");
        collectionIn.add("bbb");
        collectionIn.add("ccc");
        collectionIn.add("222");
        collectionIn.add("11");
        Iterator<String> iterator = collectionIn.createIterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }

}
